'use strict';
const express = require('express');
const path = require('path');

const app = express();
app.use('/public', express.static('public'));

app.get('/', (req, res) => {
    console.log(req.url);
    res.send('Hello World');
});
app.get('/add', (req, res) => {
    res.send('add ');
});
app.post('/', (req, res) => {
    res.send('Hello World')
});

const server = app.listen(3000, () => {
    let host = server.address().address;
    let port = server.address().port;
    console.log(`Example app listening at http://%s:%s`, host, port)
});